package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCompanyCaseMapper;
import com.ruoyi.system.domain.SysCompanyCase;
import com.ruoyi.system.service.ISysCompanyCaseService;

/**
 * 企业典型案例Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-09
 */
@Service
public class SysCompanyCaseServiceImpl implements ISysCompanyCaseService 
{
    @Autowired
    private SysCompanyCaseMapper sysCompanyCaseMapper;

    /**
     * 查询企业典型案例
     * 
     * @param caseId 企业典型案例主键
     * @return 企业典型案例
     */
    @Override
    public SysCompanyCase selectSysCompanyCaseByCaseId(Long caseId)
    {
        return sysCompanyCaseMapper.selectSysCompanyCaseByCaseId(caseId);
    }

    /**
     * 查询企业典型案例列表
     * 
     * @param sysCompanyCase 企业典型案例
     * @return 企业典型案例
     */
    @Override
    public List<SysCompanyCase> selectSysCompanyCaseList(SysCompanyCase sysCompanyCase)
    {
        return sysCompanyCaseMapper.selectSysCompanyCaseList(sysCompanyCase);
    }

    /**
     * 新增企业典型案例
     * 
     * @param sysCompanyCase 企业典型案例
     * @return 结果
     */
    @Override
    public int insertSysCompanyCase(SysCompanyCase sysCompanyCase)
    {
        sysCompanyCase.setCreateTime(DateUtils.getNowDate());
        return sysCompanyCaseMapper.insertSysCompanyCase(sysCompanyCase);
    }

    /**
     * 修改企业典型案例
     * 
     * @param sysCompanyCase 企业典型案例
     * @return 结果
     */
    @Override
    public int updateSysCompanyCase(SysCompanyCase sysCompanyCase)
    {
        sysCompanyCase.setUpdateTime(DateUtils.getNowDate());
        return sysCompanyCaseMapper.updateSysCompanyCase(sysCompanyCase);
    }

    /**
     * 批量删除企业典型案例
     * 
     * @param caseIds 需要删除的企业典型案例主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyCaseByCaseIds(Long[] caseIds)
    {
        return sysCompanyCaseMapper.deleteSysCompanyCaseByCaseIds(caseIds);
    }

    /**
     * 删除企业典型案例信息
     * 
     * @param caseId 企业典型案例主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyCaseByCaseId(Long caseId)
    {
        return sysCompanyCaseMapper.deleteSysCompanyCaseByCaseId(caseId);
    }
}
